package pl.lodz.p.browarex.service;

import javax.inject.Named;

import org.springframework.beans.factory.annotation.Autowired;

import pl.lodz.p.browarex.base.BaseCrudService;
import pl.lodz.p.browarex.dao.UserDAO;
import pl.lodz.p.browarex.model.User;
import pl.lodz.p.browarex.services.interfaces.IUserService;

@Named
public class UserService extends BaseCrudService<UserDAO, User, Long> implements
		IUserService {

	@Autowired
	public UserService(UserDAO dao) {
		super(dao);
	}

	@Override
	public User getByUsername(String username) {
		return ((UserDAO) dao).getByUsername(username);
	}

	@Override
	public User getLogged() {
		return ((UserDAO) dao).getLogged();
	}

}
